function RandomFloat(min: number, max: number) {
    return Math.random() * (max - min) + min;
}

export interface RandomPointType {
    size?: number,
    mapx?: { start: number, end: number },
    mapy?: { start: number, end: number }
}
export const RandomPointCoordinates = (opt: RandomPointType = {}) => {
    const {
        size = 1,
        mapx = { start : 110,end : 118},
        mapy = { start : 33,end : 37}
    } = opt
    return Array(size).fill('').map(() => [RandomFloat(mapx.start,mapx.end) , RandomFloat(mapy.start,mapy.end)])
}